# Maintainer: Michael Haggerty <mhagger@github.com>

_realname="git-sizer"
pkgbase="mingw-w64-${_realname}"
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.3.0
pkgrel=1
pkgdesc="Compute various size metrics for a Git repository, flagging those that might cause problems"
arch=('any')
url="https://github.com/github/git-sizer"
src_zip_url="${url}/archive/v${pkgver}.zip"
license=('MIT')
groups=('VCS')

case "$CARCH" in
i686)
  zipname="git-sizer-$pkgver-windows-386.zip"
  sha256sum=abad6350e72f848117b6b12b3fa0f7695a1dd9ed87b5dec8e7d2e65246753dbf
  ;;
x86_64)
  zipname="git-sizer-$pkgver-windows-amd64.zip"
  sha256sum=15d9e56c10f81612796e8cbe6ff8e53eecfbabae1770b4a557252fce6e6addce
  ;;
esac

source=("https://github.com/github/git-sizer/releases/download/v$pkgver/$zipname"
	"$src_zip_url")

sha256sums=("$sha256sum" SKIP)
options=('!strip')

package() {
  install -d -m755 $pkgdir/$MINGW_PREFIX/bin
  install -m755 $srcdir/git-sizer.exe $pkgdir/$MINGW_PREFIX/bin/git-sizer.exe
  install -d -m755 $pkgdir/$MINGW_PREFIX/share/doc/git-sizer
  install -m644 $srcdir/README.md $pkgdir/$MINGW_PREFIX/share/doc/git-sizer/README.md
}
